﻿Imports SistemaINCA.Models

Namespace Controllers
    Public Class ProfesoresController
        Inherits Controllers.BaseController

        Function Index() As ActionResult
            Dim dbRepositorio As New Models.SchoolClickDB_Repositorio

            Try
                Return View()
            Catch ex As Exception
                Throw ex
            End Try
        End Function
        <Authorize(Roles:="PRF")> _
        Function View_DatosProfesor() As ActionResult
            Dim dbRepositorio As New SchoolClickDB_Repositorio
            'Dim modelInfoP As GET_INFO_PERSONAL_BYPROFESOR_DATATYPE

            'Try
            '    modelInfoP = dbRepositorio.GET_INFO_PERSONAL_BYPROFESOR(User.Identity.Name)
            '    Return (PartialView(New ViewModels.PerfilProfesorModel() With
            '                        {.Identificador = modelInfoP.ID_USUARIO,
            '                         .Nombres = modelInfoP.NOMBRES,
            '                         .Apellidos = modelInfoP.APELLIDOS,
            '                         .Correo = modelInfoP.CORREO_ELECTRONICO
            '                         }))
            'Catch ex As Exception
            '    Throw New Exception(ex.Message, ex)
            'End Try
        End Function
        <Authorize(Roles:="PRF")> _
        Function ViewDefActividad() As ActionResult
            Dim dbRepositorio As New Models.SchoolClickDB_Repositorio

            Try
                Return View()
            Catch ex As Exception
                Throw ex
            End Try
        End Function
        <Authorize(Roles:="PRF")> _
        Function ViewGradosLastyear() As ActionResult
            Dim dbRepositorio As New SchoolClickDB_Repositorio

            Try
                Return PartialView(dbRepositorio.GET_ALLMATERIAS_PROFESOR_BY_ANIO(User.Identity.Name))
            Catch ex As Exception
                Throw New Exception(ex.Message, ex)
            End Try
        End Function
    End Class
End Namespace
